TARGET = libusecppunit.a

SRCS = $(wildcard *.c)
SRCS += $(wildcard *.cpp)
OBJS = $(foreach src, $(SRCS), $(basename $(src)).o )

AR = ar
CXX = g++

CFLAGS += -pipe -Wall -g -DLBTEST
CFLAGS += -I ../../lib/external/drangon
LDFLAGS +=	-L ../../lib/external/drangon -ldrangon
LDFLAGS +=	-l pthread

#####################################
.PHONY : all clean

all : $(TARGET)

$(TARGET) : $(OBJS)
	$(AR) crv $@ $(OBJS)

clean :
	@rm -f $(TARGET) *.o

##################################
.SUFFIXES : .c .cpp

.cpp.o :
	$(CXX) $(CFLAGS) -c -o $@ $<

.c.o :
	$(CXX) $(CFLAGS) -c -o $@ $<
